package com.whj.account.captcha;

import java.util.Random;

public class RandomGenerator {
    private static final String range = "0123456789abcdefghijklmnopqrstuvwxyz";
    private static final Random random = new Random();

    public static String getRandomString(){
        StringBuilder stringBuilder = new StringBuilder(8);
        for(int i = 0; i < 8; i++){
            int index = random.nextInt(range.length());
            stringBuilder.append(range.charAt(index));
        }
        return stringBuilder.toString();
    }
}
